﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="txt_replace.aspx.cs" Inherits="He.Web.manage.tools.txt_replace" %>

<%@ Register Src="../_uc/head_edit.ascx" TagPrefix="uc" TagName="head_edit" %>
<%@ Register Src="../_uc/head.ascx" TagPrefix="uc" TagName="head" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>批量文本替换</title>
    <uc:head runat="server" ID="uchead" />
    <uc:head_edit runat="server" ID="uchead_edit" />
    <script type="text/javascript">
        function checkForm(obj) {
            var oldStr = $('#txtOldTxt').val();
            if (oldStr == '') {
                alert('请填写查找内容');
                $('#txtOldTxt').focus();
                return false;
            } else {
                $(obj).hide();
                $('#doLoading').show();
                return true;
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="navigation">
        <b>您当前的位置：首页 &gt; 系统管理 &gt; 批量文本替换</b></div>
    <div style="padding-bottom: 10px;">
    </div>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
        <tbody>
            <tr>
                <th colspan="2" align="left">
                    批量文本替换
                </th>
            </tr>
            <tr>
                <td colspan="2">
                    <font color="red">(此功能会替换所有整站中所匹配的文本，数据量大时替换时间较长，请耐心等待。此功能涉及全站数据库的替换，请谨慎操作，执行前建议先 <a
                        href="backup.aspx">备份数据库</a> )</font>
                </td>
            </tr>
            <tr>
                <td width="20%" align="right">
                    查找内容：
                </td>
                <td align="left">
                    <asp:TextBox ID="txtOldTxt" CssClass="input w380 required" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right">
                    替换为：
                </td>
                <td>
                    <asp:TextBox ID="txtNewTxt" CssClass="input w380" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td>
                    <asp:Button ID="btnSave" runat="server" Text="确认执行" CssClass="submit" OnClick="btnSave_Click"
                        OnClientClick="checkForm(this)" />
                    <span id="doLoading" style="display: none">
                        <img src="../images/loading.gif" />执行中，请稍后...</span>
                </td>
            </tr>
        </tbody>
    </table>
    </form>
</body>
</html>
